<template>
  <div>
    <el-select v-model="value" filterable placeholder="请选择" @change="$emit('ChangeLevel',value)">
    <el-option
      v-for="item in tags"
      :key="item.problemTagId"
      :label="item.problemTagName"
      :value="item.problemTagId"
      >
    </el-option>
  </el-select>

  </div>
  
</template>

<script>
import API from '../api/question'
export default {
    emits:['change-level'],
    name:'Select',
    data() {
      return {
        tags:[],

        value: 'All'
      }
  },
  mounted() {
    let token = localStorage.getItem('token')
    API.getTags(token).then(res=>{
      this.tags = res.data.content
    }).catch(e=>{
      console.log(e)
    })
  }
}
</script>

<style scoped>

</style>